<template>
  <div class="wrap" :key="1">
    <div class="left classify1_head_left">
        <svg class="icon classify1_icon" aria-hidden="true" @click="Handericon_link()">
          <use xlink:href="#icon-icon_xiangji"></use>
        </svg>
    </div>
    <div class="search search_head">
      <button>
        <svg class="button_icon" aria-hidden="true">
          <use xlink:href="#icon-sousuo2"></use>
        </svg>
      </button>
      <input type="text" v-model="searchValue" placeholder="search for something you need">
    </div>
    <div class="right">
      <div class="admin_login" @click="HandlerAdminLog()">我是管理员</div>
      <div class="right_login" @click="HandlerLog()">
        <span>登录</span>
        <i class="iconfont icon-denglu1"></i>
      </div>
      <div class="right_reg" @click="HandlerReg()">
        注册
        <i class="iconfont icon-zhuce1"></i>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "HeadClassify1",
  props: {
    title: String
  },
  data() {
    return {
      titles: this.title,
      searchValue: ""
    };
  },
  methods: {
    HandlerAdminLog() {
      this.$router.push("/AdminLogin");
    },
    HandlerReg() {
      this.$router.push("/Register");
    },
    HandlerLog() {
      this.$router.push("/Login");
    },
    Handericon_link(){
       this.$router.push("/");
    }
  },
  watch: {
    title: function(newValue, oldValue) {
      this.titles = newValue;
    }
  }
};
</script>

<style scoped>
.classify1_head_left {
  width: 60px;
}
.classify1_icon {
  width: 100%;
}
.search input {
  width: 70%;
}
</style>
